<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorator="template">
<body>
<th:block layout:fragment="content">

    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>部门新增</h5>
                        <div class="ibox-tools">
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="commentForm">
                            <input type="hidden" th:value="${entity.id}" id="hdId"/>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">公司名：</label>
                                <div class="col-sm-8">
                                    <select class="form-control input-sm" id="companyList">
                                        <option th:each="companyOne:${companyList}" th:value="${companyOne.id}" th:text="${companyOne.name}" th:selected="${entity.company_id}"></option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">部门名称：</label>
                                <div class="col-sm-8">
                                    <input id="depName" type="text" class="form-control" th:value="${entity.name}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-8">
                                    <textarea id="remark" name="comment" class="form-control" th:text="${entity.remark}"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-3">
                                    <button class="btn btn-primary" type="button" onclick="saveDep()">保存</button>
                                    <button class="btn btn-primary" type="button" onclick="history.go(-1);">返回</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--<div th:replace="/department/model::modelDiv"></div>-->
    <js th:replace="/department/add/businessJs::businessJs"></js>
</th:block>
</body>
</html>